<?php
defined('SYSPATH') OR die('No direct access allowed.');
/**
 * pelamarbahasa.php
 * @author ranuandra
 *
 * 7 Jun 2012 13:51:50
 *
 * 
 */

class Model_Pelamarbahasa extends ORM
{
	protected $_belongs_to = array(
			'mstbahasa' 		=> array('model'	 => 'mstbahasa'),
	        'mstpelamar' 		=> array('model'	 => 'mstpelamar'),
	);
	
	private $_field = array('mstbahasa_id', 'lisan', 'tulisan', 'flag');
	private $_form = array('mstbahasa_id' 	=> '', 
							'lisan'			=> '',
							'tulisan'		=> '',
							'flag'			=> '',
	                      );
	
	public $rules = array(
					'mstbahasa_id' => array(
									array('min_length', array(':value', 0)),
								),
					'lisan' => array(
									array('min_length', array(':value', 0)),
								),
					'tulisan' => array(
									array('min_length', array(':value', 0)),
								),
					'flag' => array(
									array('min_length', array(':value', 0)),
								),
	);
	
	public function getField()
	{
		return $this->_field;
	}
	
	public function getForm()
	{
		return $this->_form;
		
	}
	
	public function create_data($values)
	{
	    return $this->values($values, $this->_field)->create();
	}	
}